
import axios from "axios";
import { BASE_URL } from "./ApiCons";

export const  getTrolleyBYUserName = (userName:string):Promise<any> =>{
    return axios.get(
        BASE_URL + `/trolley?userName=${userName}`
    )
}
export const addTrolleyApi = (bookId:any,userName:string,num:number):Promise<any> => {
    return axios.post(
        BASE_URL + '/trolley',
        {
            bookId,
            userName,
            num    
        }
    )
}

export const delTrolleyApi = (bookId:number,userName:string):Promise<any> => {
    return axios.delete(BASE_URL + '/trolley',{data:{bookId,userName}})
}
